package vo;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Transient;


/**
 * 商品：
 * 主键，编号，名称，价格，售卖时间，类别（如水果，家居等），折扣，数量，备注，
 */
@Entity
public class Commodity implements Serializable{

	//使用序列自增长作为商品的唯一标识
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer commodityId;

	//商品编号
	private String commodityCode;

	//商品名称
	private String commodityName;

	//商品价格
	private double commodityPrice;
	
	//商品类型
	private String commodityType;
	
	//商品折扣
	private double commodityDiscount;
	
	//商品库存数量
	private int commodiryNum;
	
	//商品备注
	private String commodityTip;
	
	
	//多个商品对应一个商家
	private Integer storeId;
	
	//存放图片的地址
	private String pictureUri;
	
	//商品得状态（1表示可买，0表示不可买）
	private int commodiryStatus;
	
	

	

	public int getCommodiryStatus() {
		return commodiryStatus;
	}

	public void setCommodiryStatus(int commodiryStatus) {
		this.commodiryStatus = commodiryStatus;
	}

	public Integer getStoreId() {
		return storeId;
	}

	public void setStoreId(Integer storeId) {
		this.storeId = storeId;
	}

	public Integer getCommodityId() {
		return commodityId;
	}

	public void setCommodityId(Integer commodityId) {
		this.commodityId = commodityId;
	}

	public String getCommodityCode() {
		return commodityCode;
	}

	public void setCommodityCode(String commodityCode) {
		this.commodityCode = commodityCode;
	}

	public String getCommodityName() {
		return commodityName;
	}

	public void setCommodityName(String commodityName) {
		this.commodityName = commodityName;
	}

	
	public double getCommodityPrice() {
		return commodityPrice;
	}

	public void setCommodityPrice(double commodityPrice) {
		this.commodityPrice = commodityPrice;
	}

	public String getCommodityType() {
		return commodityType;
	}

	public void setCommodityType(String commodityType) {
		this.commodityType = commodityType;
	}

	
	
	public double getCommodityDiscount() {
		return commodityDiscount;
	}

	public void setCommodityDiscount(double commodityDiscount) {
		this.commodityDiscount = commodityDiscount;
	}

	public int getCommodiryNum() {
		return commodiryNum;
	}

	public void setCommodiryNum(int commodiryNum) {
		this.commodiryNum = commodiryNum;
	}

	public String getCommodityTip() {
		return commodityTip;
	}

	public void setCommodityTip(String commodityTip) {
		this.commodityTip = commodityTip;
	}

	public String getPictureUri() {
		return pictureUri;
	}

	public void setPictureUri(String pictureUri) {
		this.pictureUri = pictureUri;
	}
	
	
	
}